<?php 

class ArmazonBN{

	public function crearArmazon(Armazon $oArmazon){
		
		$oArmazon->save();
	
	}
	
	public function actualizarArmazon(Armazon $oArmazon){
	  				
			
		$oArmazon->save();
		
	}
	
	public function obtenerArmazon($codUe) {
		
		$criteria = new Criteria(ArmazonPeer::DATABASE_NAME);
		$criteria->add(ArmazonPeer::CODUE, $codUe);
		//$criteria->add(ArmazonPeer::CODARMAZON, $codArmazon);
		
		$aObj = ArmazonPeer::doSelect($criteria);
		
		$armazon = array();
		
		foreach($aObj as $obj) {
			$armazon[$obj->getCodarmazon()] = $obj; 
		}
		
		return $armazon;
	}
	
	public function eliminarArmazon(Armazon $oArmazon) {
		
		 $oArmazon->delete();
	} 
	
	
}

?>